#define MATCH_ROM	 	0x55
#define SKIP_ROM	 	0xCC
#define	SEARCH_ROM	 	0xF0

#define CONVERT_T	 	0x44	 // DS1820 commands
#define READ		 	0xBE
#define WRITE		 	0x4E
#define EE_WRITE	 	0x48
#define EE_RECALL	 	0xB8

#define	SEARCH_FIRST	0xFF	// start new search
#define	PRESENCE_ERR	0xFF
#define	DATA_ERR	    0xFE
#define LAST_DEVICE	    0x00	// last device found  0x01 ... 0x40: continue searching

#define DS1820_PIN	 	PD0
#define DS1820_IN	 	PIND
#define DS1820_OUT	 	PORTD
#define DS1820DDR	 	DDRD

unsigned char DS1820_reset(void);
unsigned char DS1820_bit_io (unsigned char ack);
unsigned char DS1820_byte_wr (unsigned char b);
unsigned int DS1820_byte_rd (void);
void DS1820_start (void);
